package bst;

import bt.BT;

/**
 * Projeto : Arvore Preta e Vermelha
 * 
 * Equipe:
 * 			Antonio Eduardo
 * 			Gabriel de Brito
 * 			Gervasio Costa
 * 			Jordan Ferreira
 * 			Wesley Breno
 * 
 */

/**
 * The interface of a binary search tree (BST). 
 */
public interface BST<T extends Comparable<T>> extends BT<T>{
	
	/**
	 * Returns the node containing the greatest element in a BST. If the tree is empty 
	 * the method returns null. 
	 */	
	public BSTNode<T> maximum();

	/**
	 * Returns the node containing the lowest element in a BST. 
	 * If the tree is empty the method returns null. 
	 */	
	public BSTNode<T> minimum();

	/**
	 * Returns the successor of a node in a BST or null if it does not exist.  
	 */		
	public BSTNode<T> sucessor(BSTNode<T> node);

	/**
	 * Returns the predecessor of a node in a BST or null if it does not exist.  
	 */		
	public BSTNode<T> predecessor(BSTNode<T> node);
	
}
